/*
 * commons is a based project implemented
 * Copyright (C) 2024 Jasmine
 */
package com.easy.auth.satoken.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import com.easy.auth.satoken.properties.SaTokenDaoProperties;
import com.easy.auth.satoken.properties.SaTokenPermissionProperties;
import com.easy.auth.satoken.properties.SaTokenSecurityProperties;

/**
 * SaToken 扩展配置属性
 *
 * @author Jasmine
 * @since 1.0.0
 */
@ConfigurationProperties(prefix = "sa-token.extension")
public class SaTokenExtensionProperties {

    /**
     * 是否启用扩展
     */
    private boolean enabled = false;

    /**
     * 持久层配置
     */
    @NestedConfigurationProperty
    private SaTokenDaoProperties dao;

    /**
     * 权限配置
     */
    @NestedConfigurationProperty
    private SaTokenPermissionProperties permission;

    /**
     * 安全配置
     */
    @NestedConfigurationProperty
    private SaTokenSecurityProperties security;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public SaTokenDaoProperties getDao() {
        return dao;
    }

    public void setDao(SaTokenDaoProperties dao) {
        this.dao = dao;
    }

    public SaTokenSecurityProperties getSecurity() {
        return security;
    }

    public void setSecurity(SaTokenSecurityProperties security) {
        this.security = security;
    }

    public SaTokenPermissionProperties getPermission() {
        return permission;
    }

    public void setPermission(SaTokenPermissionProperties permission) {
        this.permission = permission;
    }
}
